{template header}

    {template title}

    <div class="box">
    <!--{if $a == 'index'}-->
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <th width="15%">名称</th>
                <th width="25%">地址</th>
                <th>描述</th>
                <th width="12%">操作</th>
            </tr>
        <!--{if $this->list}-->
            <!--{loop $this->list $val}-->
            <tr>
                <td>{$val["title"]}</td>
                <td>{$val["url"]}</td>
                <td>{$val["info"]}</td>
                <td>
                    <a class="btn btn-mini" href="{$this->url( $c, 'edit', array('id' => $val['id']) )}">编辑</a>
                    <a class="del btn btn-mini btn-danger" title="删除{$this->name}" href="{$this->url( $c, 'del', array('id' => $val['id'] ))}">删除</a>
                </td>
            </tr>
            <!--{/loop}-->
        <!--{else}-->
            <tr>
                <td colspan="4">没有{$this->name}!</td>
            </tr>
        <!--{/if}-->
            <tr>
                <td colspan="4" class="td6">
                    <a class="btn btn-success" href="{$this->url($c, 'add' )}">添加{$this->name}</a>
                </td>
            </tr>
        </table>
    <!--{/if}-->
    <!--{if $a == 'add' || $a == 'edit'}-->
        <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']) )}">
            <table cellpadding="1" cellspacing="1" width="100%" border="0">
                <tr>
                    <td class="td1" width="25%">{$this->name}名称：</td>
                    <td class="td2">
                        <input type="text" name="title" placeholder="请输入{$this->name}名称" value="{$result['title']}" class="required" />
                    </td>
                </tr>
                <tr>
                    <td class="td1">{$this->name}地址：</td>
                    <td class="td2">
                        <input type="text" name="url" placeholder="请输入{$this->name}地址" value="{$result['url']}"  class="required"  />
                    </td>
                </tr>
                <tr>
                    <td class="td1">{$this->name}LOGO：</td>
                    <td class="td2">
                        <input type="text" name="logo" value="{$result['logo']}" class="span4"  />
                    </td>
                </tr>
                <tr>
                    <td class="td1">{$this->name}描述：</td>
                    <td class="td2">
                        <textarea name="info">{$a == 'edit' ? $result['info'] : ''}</textarea>
                    </td>
                </tr>
                <tr>
                    <th colspan="2" class="td3">
                        <a title="保存{$this->name}" class="btn btn-success save" href="{$this->url($c)}">保 存</a>
                    </th>
                </tr>
            </table>
        </form>
    <!--{/if}-->
    </div>
{template footer}